package com.ps.util;

import com.ps.model.vo.UserVo;


public class ThreadUtil {
    private static final ThreadLocal<UserVo> THREAD_LOCAL_USER = new ThreadLocal<>();




    public static UserVo getUser() {
        return THREAD_LOCAL_USER.get();
    }

    public static void setUser(UserVo user) {
        THREAD_LOCAL_USER.set(user);
    }

    public static void clearAll() {
        clearUser();
    }


    public static void clearUser() {
        THREAD_LOCAL_USER.remove();
    }
}
